home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-012.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  51.1 KB  |  1,367 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Mon, 09 Mar 92       Volume 1 : Issue 12
  2.  
  3. Today's Topics:
  4.  
  5.     Playing 'snd' resources.
  6.     Help with Drag and Drop...
  7.     Can I do these things from a completion proc?
  8.     'snd' resources
  9.     Reading MacApp.$TECH on ETO #5??
  10.     where Hunk Manager?
  11.  
  12.  
  13. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  14.  
  15. These digests are available (by using FTP, account anonymous, your email
  16. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  17. edu (try skinner.cs.uoregon.edu if that doesn't work).  This is also the home
  18. of the comp.sys.mac.programmer Frequently Asked Questions list.
  19.  
  20. The articles in these digests are taken directly from comp.sys.mac.programmer.
  21. They are not edited; all articles included in this digest are in their original
  22. posted form.  The only articles that are -not- included in these digests are
  23. those which didn't receive any replies (except those that give information
  24. rather than ask a question).  All replies to each article are concatenated
  25. onto the original article in the order in which they were received.  Article
  26. threads are not added to the digests until the last article added to the
  27. thread is at least one month old (this is to ensure that the thread is dead
  28. before adding it to the digests).
  29.  
  30. Send administrative mail to mkelly@cs.uoregon.edu.
  31.  
  32. -------------------------------------------------------
  33.  
  34. From: pcalahan@envy.Reed.Edu (Patrick John Calahan)
  35. Subject: Playing 'snd' resources.
  36. Date: 29 Jan 92 10:39:06 GMT
  37. Organization: Reed College, Portland, OR
  38.  
  39. I'm programming in THINK C and I need to play sound resources in the  
  40. background.  I'm a bit of a novice in dealing with the toolbox, but my  
  41. understanding is that I need to open a sound channel with NewSndChannel  
  42. and then call SndPlay.  This seems to work ok the first time the sound is  
  43. played, but subsequent sounds will not be played, and it seems to disable  
  44. System beeps as well, even after I am done with the application.  Calling  
  45. DisposeSndChannel right after the SndPlay remedies this problem, but then  
  46. program execution halts until the sound is done playing (which can't  
  47. happen for my purposes).  Is there something I need to do after a call to  
  48. SndPlay to prepare the channel for the next sound to be played?
  49.     I would be deeply indebted to anyone who could deliver me from  
  50. ignorance as to how I can play sounds in the sound buffer without halting  
  51. program execution.
  52.                 -Patrick Calahan
  53.  
  54.  
  55.  
  56. - -------------------------
  57.  
  58. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  59. Subject:  Playing 'snd' resources.
  60. Organization: Kalamazoo College
  61. Date: Wed, 29 Jan 1992 13:58:29 GMT
  62.  
  63. pcalahan@envy.Reed.Edu (Patrick John Calahan) writes:
  64. >I'm programming in THINK C and I need to play sound resources in the  
  65. >background. ...[Calling SndPlay] seems to work ok the first time the sound is  
  66. >played, but subsequent sounds will not be played, and it seems to disable  
  67. >System beeps as well, even after I am done with the application.  Calling  
  68. >DisposeSndChannel right after the SndPlay remedies this problem, but then  
  69. >program execution halts until the sound is done playing (which can't  
  70. >happen for my purposes).
  71.  
  72. You should SndDisposeChannel for every time you SndNewChannel.  That's
  73. why sounds stop working even after you exit your application--there's
  74. still a channel active that you hadn't disposed.  (There was a patch to
  75. _ExitToShell in 6.0.4, I believe, that automatically disposed of
  76. undisposed channels, but it was buggy and they removed it.  Anyone know
  77. if it was revived later?)
  78.  
  79. OK, so you need to dispose of that channel.  You can't do it right after
  80. you call SndPlay, because either (a) you pass TRUE for the quietNow
  81. parameter, and the sound shuts off immediately, or (b) you pass FALSE
  82. in quietNow, and your program waits until the sound is done.  You have
  83. to do it sometime before you play the next sound.  You _could_ keep a
  84. global for the sound channel, then every time you want to play a sound,
  85. you check to see if it's allocated:  if so, dispose of it immediately,
  86. re-initialize it, and call SndPlay;  if not, initialize it and call
  87. SndPlay.  Be sure to dispose of it before the program ends.
  88.  
  89. ...or, you could use some code that I've written.  It's a THINK C object
  90. to play sounds, you don't need the Think Class Library to use it, it's
  91. pretty flexible, and it does what you want it to do with one call.
  92. (That is, play sounds asynchronously.)  Anyone who wants it can have it.
  93. Just mail me.
  94. -- 
  95.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  96.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  97.  
  98.  
  99.  
  100. - -------------------------
  101.  
  102. From: mhall@occs.cs.oberlin.edu (Matthew Hall)
  103. Subject:  Playing 'snd' resources.
  104. Date: 29 Jan 92 21:30:50 GMT
  105. Organization: Oberlin College Computer Science
  106.  
  107.  
  108. - Another way to implement this is to define a callback routine.  You
  109. pass the proc pointer when you open the sound channel.  Then play the
  110. sound with SndPlay, buffercmd, or notecmd.  Immediately after calling
  111. one of those commands, send a callbackcmd with SndDoCommand (don't use
  112. SndDoImmediate or you're callback routine will be called immediately)
  113. And go on with the rest of your program.
  114.     Then, when your sound is done playing, your callback routine
  115. will be called.  Since it may be called at interrupt time, you can not
  116. dispose of the channel there, However, you can set a global flag to
  117. indicate that the sound is done. (To acess globals, however, you have
  118. to use SetUpA5 and RestoreA5).  Your callback rouutine could be 3
  119. lines long.  Then, in your main loop you could poll the flag, and if
  120. it is set, call SndDisposeChannel.  
  121.  
  122. -Matt Hall
  123.  
  124. --
  125.  
  126. <<mhall@occs.edu OR
  127. <<SMH9666@OBERLIN.BITNET
  128.  
  129. This is just a beta version signature
  130.  
  131.  
  132.  
  133. - -------------------------
  134.  
  135. From: potts@itl.itd.umich.edu (Paul Potts)
  136. Subject:  Playing 'snd' resources.
  137. Date: 30 Jan 92 15:05:54 GMT
  138. Organization: Advanced Workstation Lab, University of Michigan
  139.  
  140. In article <MHALL.92Jan29163050@occs.cs.oberlin.edu> mhall@occs.cs.oberlin.edu (Matthew Hall) writes:
  141. >
  142. >- Another way to implement this is to define a callback routine.  You
  143. >pass the proc pointer when you open the sound channel.  Then play the
  144. >sound with SndPlay, buffercmd, or notecmd.  Immediately after calling
  145. >one of those commands, send a callbackcmd with SndDoCommand (don't use
  146. >SndDoImmediate or you're callback routine will be called immediately)
  147. >And go on with the rest of your program.
  148.  
  149. I'm having trouble with this. Nothing that crashes or anything bad like
  150. that, but:
  151.  
  152. - I have code which installs a sampled sound into a channel and plays
  153. notes with it using the sample as an instrument, passing freqCmds
  154. using SndDoCommand. I have set up a callback routine to tell me when
  155. the sound is done playing.
  156.  
  157. - My callaback routine is getting called right after the sound starts
  158. playing. That is: I send a freqCmd to the channel followed by a 
  159. CallBackCmd. The freqCmd starts playing, but after a very short time
  160. (a tenth of a second or so, while it is still playing asynchronously)
  161. my callback routine gets called.
  162.  
  163. Will callbacks time the sound properly _only_ when used with noteCmds
  164. (now called freqDurationCmds?) 
  165.  
  166. At the moment, if my DisposeChannel method gets called, I have to use
  167. the sound status in addition to looking at my global. My global (soundDone)
  168. will get set by the callback and it looks like I should be able to
  169. dispose of the channel, but in fact an asynch sound might still be
  170. playing, and the sound gets cut off when I dispose of the channel.
  171. Instead I need to spin a loop looking at the sound channel status until
  172. I'm sure it is not busy, then close the channel. This is bothersome,
  173. and sort of violates the spirit of asynchronous sounds.
  174.  
  175. Any ideas?
  176.  
  177. --
  178.          -Paul Potts-potts@itl.itd.umich.edu- 
  179. I! Hi'm a mtatng siugnaturei vir*ss. You cann~t reisth elping me  spre]d !
  180.  
  181.  
  182.  
  183. - -------------------------
  184.  
  185. From: stephenm@syacus.acus.oz.au (Stephen McIntosh)
  186. Subject:  Playing 'snd' resources.
  187. Date: 2 Feb 92 23:53:28 GMT
  188. Organization: ACUS Australian Centre for Unisys Software, Sydney
  189.  
  190. Has anyone tried to open and read samples in an AIFF sound file. I'm using
  191. ThinkC5.0.2. Any code samples would be a lot of help.
  192.  
  193. Thanks in advance
  194. Stephen McIntosh
  195. ACUS-The Australian Centre for UNISYS software
  196. Phone:    +61-2-390-1371    | ACSnet:   stephenm@syacus.OZ
  197. Fax:    +61-2-390-1391    | Internet: stephenm@syacus.OZ.AU
  198. 115 Wicks Road        | UUCP:     uunet!munnari!syacus.acus.oz.au!stephenm
  199. North Ryde   NSW   2113 |
  200. AUSTRALIA        |
  201. -- 
  202. Sincerely
  203. Stephen McIntosh
  204. ACUS-The Australian Centre for UNISYS software
  205. Phone:    +61-2-390-1371    | ACSnet:   stephenm@syacus.OZ
  206.  
  207.  
  208.  
  209. - -------------------------
  210.  
  211. From: mhall@occs.cs.oberlin.edu (Matthew Hall)
  212. Subject:  Playing 'snd' resources.
  213. Date: 4 Feb 92 18:44:11 GMT
  214. Organization: Oberlin College Computer Science
  215.  
  216.  
  217.     I have reviewed IMV again, and I believe that the callback
  218. routine fo asynch sounds may only work with buffercmds.  See, the
  219. buffercmd locks the channel while the sound is playing, and reopens it
  220. only slightly before the sound is done playing.  Therefore, any sound
  221. command that you place in the queue with SndDoCommand is not executed
  222. until the sound is finished playing (Note that placing a callbackcmd
  223. in the queue with SndDoImmediate will actually bypass the queue and
  224. call the callback routine right away) However, IMV didn't say that
  225. notecmd freezes the channel, so callback routines are performed as
  226. soon as they are placed in the queue.  (but then, for notecmds one
  227. specifies the duration, so the program should know exactly when it's
  228. finished) And if you need to change the frequency of a sound played
  229. with buffercmd, just send commands with SndDoImmediate. 
  230.  
  231. -matt hall\
  232. --
  233.  
  234. <<mhall@occs.edu OR
  235. <<SMH9666@OBERLIN.BITNET
  236.  
  237. This is just a beta version signature
  238.  
  239.  
  240.  
  241. - -------------------------
  242.  
  243. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  244. Subject:  Playing 'snd' resources.
  245. Organization: Kalamazoo College
  246. Date: Wed, 5 Feb 1992 15:24:58 GMT
  247.  
  248. mhall@occs.cs.oberlin.edu (Matthew Hall) writes:
  249. >    I have reviewed IMV again, and I believe that the callback
  250. >routine fo asynch sounds may only work with buffercmds.
  251. >However, IMV didn't say that
  252. >notecmd freezes the channel, so callback routines are performed as
  253. >soon as they are placed in the queue.  (but then, for notecmds one
  254. >specifies the duration, so the program should know exactly when it's
  255. >finished)
  256.  
  257. Paul Potts and I were discussing this, and we both came to this
  258. conclusion as well.  For example, "bufferCmd, quietCmd, callBackCmd"
  259. plays the sound asynch, then does the callback;  "noteCmd,
  260. quietCmd, callBackCmd" plays the sound for a fraction of a second, then
  261. cuts it off and does the callback.
  262.  
  263. If bufferCmd is an exception (as it appears to be), this should be made
  264. clear in IM.  (Gr!)  Could someone from Apple verify that this is the
  265. case?
  266. -- 
  267.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  268.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  269.  
  270.  
  271.  
  272. - -------------------------
  273.  
  274. From: stevem@cs.utexas.edu (Steve Anthony Mariotti)
  275. Subject:  Playing 'snd' resources.
  276. Date: 8 Feb 1992 14:50:27 -0600
  277. Organization: U Texas Dept of Computer Sciences, Austin TX
  278.  
  279. In article <MHALL.92Feb4134411@occs.cs.oberlin.edu> mhall@occs.cs.oberlin.edu (Matthew Hall) writes:
  280. >    I have reviewed IMV again, and I believe that the callback
  281. >routine fo asynch sounds may only work with buffercmds.  See, the
  282. >buffercmd locks the channel while the sound is playing, and reopens it
  283. >only slightly before the sound is done playing.  Therefore, any sound
  284.  
  285. It's is not a good idea to consult Inside Macintosh Volume 5 in relation
  286. to the Sound Manager.  I found this out the hard way.  The details on the
  287. Sound Manager outlined in IM5 are misleading, inconsistent, and often
  288. totally wrong.  You can get the `real' version of the IM 5 sound manager
  289. chapter from `ftp.apple.com' in the docs directory (I believe).
  290.  
  291. Either that, or use IM 6 if your Sound Manager is a System 7 sound manager.
  292.  
  293. After banging my head against the wall for a few days, I finally posted my
  294. sound-manager related queries here on c.s.m.p and was told to look for the
  295. `real' chapter on the Sound Manager on `ftp.apple.com'.  After I got that
  296. chapter, and printed it out, everything has been great.
  297.  
  298. Steve Mariotti
  299. stevem@cs.utexas.edu
  300. wras@ccwf.cc.utexas.edu
  301.  
  302.  
  303.  
  304.  
  305. - -------------------------
  306.  
  307. From: REEKES@applelink.apple.com (Jim Reekes)
  308. Subject:  Playing 'snd' resources.
  309. Date: 8 Feb 92 02:10:50 GMT
  310. Organization: Apple Computer, Inc.
  311.  
  312. In article <1992Feb5.152458.1513@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
  313. > mhall@occs.cs.oberlin.edu (Matthew Hall) writes:
  314. > >    I have reviewed IMV again, and I believe that the callback
  315. > >routine fo asynch sounds may only work with buffercmds.
  316. > >However, IMV didn't say that
  317. > >notecmd freezes the channel, so callback routines are performed as
  318. > >soon as they are placed in the queue.  (but then, for notecmds one
  319. > >specifies the duration, so the program should know exactly when it's
  320. > >finished)
  321. > Paul Potts and I were discussing this, and we both came to this
  322. > conclusion as well.  For example, "bufferCmd, quietCmd, callBackCmd"
  323. > plays the sound asynch, then does the callback;  "noteCmd,
  324. > quietCmd, callBackCmd" plays the sound for a fraction of a second, then
  325. > cuts it off and does the callback.
  326. > If bufferCmd is an exception (as it appears to be), this should be made
  327. > clear in IM.  (Gr!)  Could someone from Apple verify that this is the
  328. > case?
  329.  
  330. There are no exceptions to any of the commands appearing before a callBackCmd.
  331. The commands are all processed in order.  All commands stop processing of the
  332. command queue until that command has completed.  The bufferCmd and 
  333. freqDurationCmd both cause the channel's queue processing to be "paused"
  334. until that command has finished it's job.  Then the next thing in the
  335. queue is processed.  If you have a freqDurationCmd queued before a
  336. callBackCmd, your callBackProc will be ran *after* the freqDurationCmd
  337. has finished.
  338.  
  339. If you think that the freqDurationCmd shouldn't have been finished yet, then
  340. there's something about your code and/or sound header that you haven't yet
  341. explained.  I need to see your code to explain what's happening.
  342.  
  343.  
  344. NEVER NEVER NEVER read Inside Mac _V_ about the Sound Manager.
  345.  
  346. ONLY ONLY ONLY read Inside Mac _VI_ about the Sound Manager.
  347.  
  348. Everybody sing, "NEVER NEVER NEVER read..."
  349.  
  350.  
  351. - -----------------------------------------------------------------
  352. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  353.                              |          Sound Manager Expert
  354. Apple Computer, Inc.         | All opinions expressed are mine, and
  355. 20525 Mariani Ave. MS: 81-EQ |  do not necessarily represent those
  356. Cupertino, CA 95014          |  of my employer, Apple Computer Inc.
  357.  
  358.  
  359.  
  360. ---------------------------
  361.  
  362. From: mlarson@bach.udel.edu (Michael E Larson)
  363. Subject: Help with Drag and Drop...
  364. Date: 31 Jan 92 15:15:28 GMT
  365. Organization: University of Delaware
  366.  
  367.  
  368.     I am trying to write a small application that will take a GIF
  369. picture and change the creator type to 'GCon' so that it can be
  370. double clicked and GIF Converter will open it.  Its cousin will change
  371. the Type to 'JPEG' and Creator to 'StPP' for PictureDecompress to open
  372. automatically.  I have the programs written, but I now want to change
  373. them to support "Drag and Drop."  I own IM 1-6 so if some one can guide
  374. me to the right section, or someone who has done this before can give
  375. me a hand.  I am writing with ThinkC 5.0  I have set the SIZE flag in
  376. the SetProhectType menu choice to HighLevelEventsAware and all that
  377. jazz.  I called AEInstall..., etc.  Any help will be greatly
  378. appreciated.
  379. -Mike
  380.  
  381. **********************************************************************
  382. *   mlarson@chopin.udel.edu    *  These views may not even          *
  383. *   mlarson@freezer.udel.edu    *  be those of myself, much less     *
  384. *********************************  those of my educational         *
  385. *      Michael E. Larson        *  institution                       *
  386. **********************************************************************
  387. *   University of Delaware - Department of Electrical Engineering    *
  388. **********************************************************************
  389.  
  390.  
  391.  
  392. - -------------------------
  393.  
  394. From: wjc0@bunny.gte.com (W. John Carlsen)
  395. Subject:  Help with Drag and Drop...
  396. Date: 4 Feb 92 02:28:32 GMT
  397. Organization: GTE Laboratories Inc
  398.  
  399. In article <18296@bach.udel.edu>, mlarson@bach.udel.edu (Michael E Larson) writes:
  400. >     I am trying to write a small application that will take a GIF
  401. > picture and change the creator type to 'GCon' so that it can be
  402. > double clicked and GIF Converter will open it.  Its cousin will change
  403. > the Type to 'JPEG' and Creator to 'StPP' for PictureDecompress to open
  404. > automatically.  ...
  405. This won't help you write it, but you may be interested in knowing that your
  406. program has already been written.  "FixCreator Pro" (which I got from 
  407. Compuserve) is a drag and drop application which you can configure, even 
  408. letting you set up to 5 different type and/or creator changes, depending on
  409. the original type and/or creator, or according to file's name (with wildcards,
  410. like *.gif).
  411.  
  412. It will process multiple types simultaneously if dragged onto the app together.
  413. You can even toggle files.  If type X, change to Y; if type Y, change to X.
  414. I've configured several copies of the app with different names to deal with 
  415. different sets of changes: graphic, programming, etc.
  416.  
  417. It is "freeware"--ie, no shareware or other charges.
  418.  
  419. John
  420.  
  421.  
  422.  
  423. - -------------------------
  424.  
  425. From: jpugh@apple.com (Jon Pugh)
  426. Subject:  Help with Drag and Drop...
  427. Date: 7 Feb 92 21:23:39 GMT
  428. Organization: Apple Co.
  429.  
  430. In article <18296@bach.udel.edu>, mlarson@bach.udel.edu (Michael E Larson) writes:
  431. I have the programs written, but I now want to change
  432. > them to support "Drag and Drop."  I own IM 1-6 so if some one can guide
  433. > me to the right section, or someone who has done this before can give
  434. > me a hand.
  435. > -Mike
  436.  
  437. The trick is to simply to include a FREF resource for any file type you want 
  438. to  be able to drag and drop.  This is mentioned somewhere in the Finder
  439. section of IM6.  Use **** for any file.  There a couple of special codes
  440. for folders and disks too.
  441.  
  442. Jon
  443.  
  444.  
  445.  
  446. ---------------------------
  447.  
  448. From: davidp@calvin.usc.edu (David Peterson)
  449. Subject: Can I do these things from a completion proc?
  450. Date: 31 Jan 92 07:16:28 GMT
  451. Organization: University of Southern California, Los Angeles, CA
  452.  
  453.  
  454.  
  455. After digging through all the docs we have I've decided to try this one
  456. on the net...
  457.  
  458. Can I safely do the following from a completion proc registered in an 
  459. asynchronous PBControl() call?
  460.  
  461. 1.    Call toolbox routines that _do not_ move/purge memory?
  462.     Such as BlockMove() -- 411 doesn't say that it moves memory...
  463.  
  464. 2.    Call routines that are in a segment other than the one my
  465.     completion proc is in? Or could _LoadSeg blow things up?
  466. Note:    The completion procs are in Main -- I hope this means that they
  467.     are locked and can't move around.
  468.  
  469. 3.a    Safely get at the fields/methods of a locked C++ object derived
  470.     from TObject in MacApp? (by stuffing the object pointer in the
  471.     user data field of the parameter block)
  472.     What I'm doing is:
  473.         theObject->Lock(true);
  474.         pb->userDataPtr = theObject;
  475.         ...
  476.     And the methods are in the same segment as the completion proc.
  477.  
  478. 3.b    Safely get at the fields/methods of a C++ object with no base
  479.     class? (again with the methods in the same segment as the
  480.     completion proc) Aren't such objects allocated as pointers (as
  481.     opposed to handles)?
  482.  
  483. 4.    Make other asynchronous PBControl() calls? The MacTCP docs claim
  484.     that I can make them from the ASR (which is called at interupt), 
  485.     but doesn`t condone/condemn the practice in completion procs.
  486.  
  487. Thanks,
  488. -dave.
  489.  
  490.  
  491.  
  492. - -------------------------
  493.  
  494. From: keith@Apple.COM (Keith Rollin)
  495. Subject:  Can I do these things from a completion proc?
  496. Date: 3 Feb 92 02:57:12 GMT
  497. Organization: Apple Computer Inc., Cupertino, CA
  498.  
  499. In article <kojm6cINNlb4@calvin.usc.edu> davidp@usc.edu writes:
  500. >
  501. >After digging through all the docs we have I've decided to try this one
  502. >on the net...
  503. >
  504. >Can I safely do the following from a completion proc registered in an 
  505. >asynchronous PBControl() call?
  506. >
  507. >1.    Call toolbox routines that _do not_ move/purge memory?
  508. >    Such as BlockMove() -- 411 doesn't say that it moves memory...
  509.  
  510. It's safe to call BlockMove(). However, you should carefully consider
  511. any Toolbox or OS calls your make, regardless of whether or not they
  512. are on the "may move memory" list. The Mac OS was written with little
  513. consideration for re-entrancy or for dealing with data stored in
  514. handles at interrupt time. For instance, DetachResource is not listed
  515. as moving or purging memory, but I'd never call it at interrupt time.
  516.  
  517. >
  518. >2.    Call routines that are in a segment other than the one my
  519. >    completion proc is in? Or could _LoadSeg blow things up?
  520. >Note:    The completion procs are in Main -- I hope this means that they
  521. >    are locked and can't move around.
  522.  
  523. Do this only if you _know_ that the segment is loaded. If it is, calling
  524. the procedure is just an indirect jump. If the segment is not loaded,
  525. _LoadSeg will load it and move memory.
  526.  
  527. >
  528. >3.a    Safely get at the fields/methods of a locked C++ object derived
  529. >    from TObject in MacApp? (by stuffing the object pointer in the
  530. >    user data field of the parameter block)
  531. >    What I'm doing is:
  532. >        theObject->Lock(true);
  533. >        pb->userDataPtr = theObject;
  534. >        ...
  535. >    And the methods are in the same segment as the completion proc.
  536.  
  537. If the object is locked, you should be able to get to its fields. Remember
  538. that this also applies to any data stored in a handle, including any
  539. of the object's fields that may be handles.
  540.  
  541. >
  542. >3.b    Safely get at the fields/methods of a C++ object with no base
  543. >    class? (again with the methods in the same segment as the
  544. >    completion proc) Aren't such objects allocated as pointers (as
  545. >    opposed to handles)?
  546.  
  547. Should be OK as long as you know the object is completely created and
  548. initialized. I can imagine a situation where your pointer to the object
  549. is valid, but where the constructor or some CMyObject::Initialize
  550. method is still running.
  551.  
  552. >
  553. >4.    Make other asynchronous PBControl() calls? The MacTCP docs claim
  554. >    that I can make them from the ASR (which is called at interupt), 
  555. >    but doesn`t condone/condemn the practice in completion procs.
  556.  
  557. I expect that this should be OK. I don't know squat about MacTCP, but I
  558. suspect that at time such a practice might actually be necessary.
  559.  
  560. -- 
  561. - ----------------------------------------------------------------------------
  562. Keith Rollin           ---            <Taligent .signature under construction>
  563. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  564.  
  565.  
  566.  
  567. - -------------------------
  568.  
  569. From: creiman@ncsa.uiuc.edu (Charlie Reiman)
  570. Subject:  Can I do these things from a completion proc?
  571. Date: 3 Feb 92 05:28:52 GMT
  572. Organization: University of Illinois at Urbana
  573.  
  574. keith@Apple.COM (Keith Rollin) writes:
  575. : In article <kojm6cINNlb4@calvin.usc.edu> davidp@usc.edu writes:
  576. : >4.    Make other asynchronous PBControl() calls? The MacTCP docs claim
  577. : >    that I can make them from the ASR (which is called at interupt), 
  578. : >    but doesn`t condone/condemn the practice in completion procs.
  579. : I expect that this should be OK. I don't know squat about MacTCP, but I
  580. : suspect that at time such a practice might actually be necessary.
  581.  
  582. I can verify that yes, you can do this. In fact, it works quite well,
  583. provided you're using MacTCP 1.1. 1.0.[12] has a bug that doesn't take
  584. well to heavy abuse of this feature. It is an effective means to speed
  585. up TCP receives of large data streams.
  586.  
  587. -- 
  588. Charlie Reiman - creiman@ncsa.uiuc.edu
  589. Submissions to RHF: 3
  590. Times published in RHF: 4
  591.  
  592.  
  593.  
  594. - -------------------------
  595.  
  596. From: ABSURD@applelink.apple.com (Tim Dierks, Cray abuser)
  597. Subject:  Can I do these things from a completion proc?
  598. Date: 3 Feb 92 22:21:35 GMT
  599. Organization: MacDTS, Apple Computer
  600.  
  601. In article <kojm6cINNlb4@calvin.usc.edu>, davidp@calvin.usc.edu (David Peterson) writes:
  602. > After digging through all the docs we have I've decided to try this one
  603. > on the net...
  604. > Can I safely do the following from a completion proc registered in an 
  605. > asynchronous PBControl() call?
  606. > 1.    Call toolbox routines that _do not_ move/purge memory?
  607. >     Such as BlockMove() -- 411 doesn't say that it moves memory...
  608.  
  609. Yes.... most of them.  For a long time, moves/purges memory was used to mean
  610. "don't call this at interrupt time".  This means that some routines which
  611. didn't move or purge memory, but relied on unlocked handles, etc, were put
  612. into the list.  Check out the new & improved list in the Inside Mac X-Ref,
  613. 2nd edition; it has a list which actually says "don't call this from an
  614. interrupt".
  615.  
  616. > 2.    Call routines that are in a segment other than the one my
  617. >     completion proc is in? Or could _LoadSeg blow things up?
  618. > Note:    The completion procs are in Main -- I hope this means that they
  619. >     are locked and can't move around.
  620.  
  621. This is OK, as long as (1) Your A5 is valid.  You can't be sure your A5
  622. will be correct when you're called from an interrupt; therefore, you've
  623. got to restore it before trying to go through the jump table.  And (2):
  624. The routine you're calling must be already loaded; you cannot get code
  625. resources off the disk at interrupt time.  You're correct in that routines
  626. in the Main segment are always locked & loaded.
  627.  
  628. > 3.a    Safely get at the fields/methods of a locked C++ object derived
  629. >     from TObject in MacApp? (by stuffing the object pointer in the
  630. >     user data field of the parameter block)
  631. >     What I'm doing is:
  632. >         theObject->Lock(true);
  633. >         pb->userDataPtr = theObject;
  634. >         ...
  635. >     And the methods are in the same segment as the completion proc.
  636. > 3.b    Safely get at the fields/methods of a C++ object with no base
  637. >     class? (again with the methods in the same segment as the
  638. >     completion proc) Aren't such objects allocated as pointers (as
  639. >     opposed to handles)?
  640.  
  641. I don't know enough about C++ internals to say for sure, but I think
  642. both of these should be OK.  Make sure your A5 is correct, in both
  643. cases, and in (3.a) you shouldn't be calling Lock from the interrupt,
  644. as it makes a call (HLock) which can't be called at interrupt time.
  645.  
  646. > 4.    Make other asynchronous PBControl() calls? The MacTCP docs claim
  647. >     that I can make them from the ASR (which is called at interupt), 
  648. >     but doesn`t condone/condemn the practice in completion procs.
  649.  
  650. This is OK, and is the basis for most server-based programs; chained
  651. completion routines is the best way to get fast server response.  Note,
  652. however, that they _must_ be asynchronous; a lot of people who ignored
  653. this broke most heinously under VM with System 7.0.
  654.  
  655. Tim Dierks
  656. MacDTS, but I speak for myself
  657.  
  658.  
  659.  
  660. - -------------------------
  661.  
  662. From: ABSURD@applelink.apple.com (Tim Dierks, Cray abuser)
  663. Subject:  Can I do these things from a completion proc?
  664. Date: 3 Feb 92 22:21:55 GMT
  665. Organization: MacDTS, Apple Computer
  666.  
  667. In article <kojm6cINNlb4@calvin.usc.edu>, davidp@calvin.usc.edu (David Peterson) writes:
  668. > After digging through all the docs we have I've decided to try this one
  669. > on the net...
  670. > Can I safely do the following from a completion proc registered in an 
  671. > asynchronous PBControl() call?
  672. > 1.    Call toolbox routines that _do not_ move/purge memory?
  673. >     Such as BlockMove() -- 411 doesn't say that it moves memory...
  674.  
  675. Yes.... most of them.  For a long time, moves/purges memory was used to mean
  676. "don't call this at interrupt time".  This means that some routines which
  677. didn't move or purge memory, but relied on unlocked handles, etc, were put
  678. into the list.  Check out the new & improved list in the Inside Mac X-Ref,
  679. 2nd edition; it has a list which actually says "don't call this from an
  680. interrupt".
  681.  
  682. > 2.    Call routines that are in a segment other than the one my
  683. >     completion proc is in? Or could _LoadSeg blow things up?
  684. > Note:    The completion procs are in Main -- I hope this means that they
  685. >     are locked and can't move around.
  686.  
  687. This is OK, as long as (1) Your A5 is valid.  You can't be sure your A5
  688. will be correct when you're called from an interrupt; therefore, you've
  689. got to restore it before trying to go through the jump table.  And (2):
  690. The routine you're calling must be already loaded; you cannot get code
  691. resources off the disk at interrupt time.  You're correct in that routines
  692. in the Main segment are always locked & loaded.
  693.  
  694. > 3.a    Safely get at the fields/methods of a locked C++ object derived
  695. >     from TObject in MacApp? (by stuffing the object pointer in the
  696. >     user data field of the parameter block)
  697. >     What I'm doing is:
  698. >         theObject->Lock(true);
  699. >         pb->userDataPtr = theObject;
  700. >         ...
  701. >     And the methods are in the same segment as the completion proc.
  702. > 3.b    Safely get at the fields/methods of a C++ object with no base
  703. >     class? (again with the methods in the same segment as the
  704. >     completion proc) Aren't such objects allocated as pointers (as
  705. >     opposed to handles)?
  706.  
  707. I don't know enough about C++ internals to say for sure, but I think
  708. both of these should be OK.  Make sure your A5 is correct, in both
  709. cases, and in (3.a) you shouldn't be calling Lock from the interrupt,
  710. as it makes a call (HLock) which can't be called at interrupt time.
  711.  
  712. > 4.    Make other asynchronous PBControl() calls? The MacTCP docs claim
  713. >     that I can make them from the ASR (which is called at interupt), 
  714. >     but doesn`t condone/condemn the practice in completion procs.
  715.  
  716. This is OK, and is the basis for most server-based programs; chained
  717. completion routines is the best way to get fast server response.  Note,
  718. however, that they _must_ be asynchronous; a lot of people who ignored
  719. this broke most heinously under VM with System 7.0.
  720.  
  721. Tim Dierks
  722. MacDTS, but I speak for myself
  723.  
  724.  
  725.  
  726. - -------------------------
  727.  
  728. From: ksand@apple.com (Kent Sandvik)
  729. Subject:  Can I do these things from a completion proc?
  730. Date: 4 Feb 92 20:15:28 GMT
  731. Organization: MacDTS Mongols
  732.  
  733. > In article <kojm6cINNlb4@calvin.usc.edu>, davidp@calvin.usc.edu (David Peterson) writes:
  734. > > 3.a    Safely get at the fields/methods of a locked C++ object derived
  735. > >     from TObject in MacApp? (by stuffing the object pointer in the
  736. > >     user data field of the parameter block)
  737. > >     What I'm doing is:
  738. > >         theObject->Lock(true);
  739. > >         pb->userDataPtr = theObject;
  740. > >         ...
  741. > >     And the methods are in the same segment as the completion proc.
  742.  
  743. Try to avoid locking handles, instead use temp stack based variables.
  744. Handle locking is more expensive concerning performance and memory use.
  745.  
  746. > > 3.b    Safely get at the fields/methods of a C++ object with no base
  747. > >     class? (again with the methods in the same segment as the
  748. > >     completion proc) Aren't such objects allocated as pointers (as
  749. > >     opposed to handles)?
  750.  
  751. Yes, MPW C++ classes which are not inherited from PascalObject or
  752. HandleObject are pointer based. Thus you shouldn't have any
  753. de-referencing problems, but more of performance ones.
  754.  
  755. Kent Sandvik
  756. DTS slacker
  757.  
  758.  
  759.  
  760. - -------------------------
  761.  
  762. From: lsr@Apple.COM (Larry Rosenstein)
  763. Subject:  Can I do these things from a completion proc?
  764. Date: 4 Feb 92 21:49:39 GMT
  765. Organization: Object Based Systems, Apple Computer, Inc.
  766.  
  767. In article <kojm6cINNlb4@calvin.usc.edu> davidp@usc.edu writes:
  768. >
  769. >Can I safely do the following from a completion proc registered in an 
  770. >asynchronous PBControl() call?
  771. >
  772. >2.    Call routines that are in a segment other than the one my
  773. >    completion proc is in? Or could _LoadSeg blow things up?
  774.  
  775. _LoadSeg moves memory, and can't be called.  If you know that _LoadSeg won't
  776. be called then the procedure call is OK.
  777.  
  778. >3.a    Safely get at the fields/methods of a locked C++ object derived
  779. >    from TObject in MacApp? (by stuffing the object pointer in the
  780. >    user data field of the parameter block)
  781.  
  782. A TObject descendant is just another handle.  I think locking it is
  783. necessary and sufficient.
  784.  
  785. >    And the methods are in the same segment as the completion proc.
  786.  
  787. That's the same as 2.  The dispatching code should be in the Main segment
  788. already, so you know it will be in memory.
  789.  
  790. >3.b    Safely get at the fields/methods of a C++ object with no base
  791. >    class? (again with the methods in the same segment as the
  792. >    completion proc) Aren't such objects allocated as pointers (as
  793. >    opposed to handles)?
  794.  
  795. It's probably OK, but you can't be sure.  A class can overload operator new
  796. and allocate the object any place it wants.
  797.  
  798. -- 
  799. Larry Rosenstein, Apple Computer, Inc.
  800.  
  801. lsr@apple.com
  802. (or AppleLink: Rosenstein1)
  803.  
  804.  
  805.  
  806. - -------------------------
  807.  
  808. From: rmh@apple.com (Rick Holzgrafe)
  809. Subject:  Can I do these things from a completion proc?
  810. Date: 4 Feb 92 21:53:27 GMT
  811. Organization: Apple Computer, Inc.
  812.  
  813. In article <kojm6cINNlb4@calvin.usc.edu>, davidp@calvin.usc.edu (David Peterson) writes:
  814. > Can I safely do the following from a completion proc registered in an 
  815. > asynchronous PBControl() call?
  816. > [...]
  817. > 4.    Make other asynchronous PBControl() calls? The MacTCP docs claim
  818. >     that I can make them from the ASR (which is called at interupt), 
  819. >     but doesn`t condone/condemn the practice in completion procs.
  820.  
  821. Yes, if you're careful. Things to watch out for:
  822.  
  823. * In some cases (I don't know about MacTCP in particular) your completion
  824. routine can be called before your asynchronous PBControl() call returns -
  825. as though you had made the call synchronously. This can happen with ADSP,
  826. for example, when you ask to read data that the driver has already buffered
  827. up for you. So make sure that you're ready for the completion routine to
  828. be called (again) BEFORE you make the next asynchronous PBControl() call.
  829.  
  830. * This implies that your completion routine can in effect be called
  831. recursively, to some depth or other. Be sure that it is re-entrant (that's
  832. another way of saying what I said in the last point) and try to keep your
  833. stack usage low, because you don't know whose stack you're using
  834. when an async completion routine gets called. I've seen bombs because
  835. some little utility app with a dinky stack happens to be running when an
  836. interrupt comes in.
  837.  
  838. * If you can't keep your stack usage low, you'll have to pre-allocate some
  839. memory to use as your own stack, and play some VERY messy games to swap
  840. stacks as needed. I don't recommend it, but it can be done.
  841.  
  842. Hope this helps.
  843.  
  844. - ---------------------------------------------------
  845. Rick Holzgrafe   rmh@apple.com   AppleLink HOLZGRAFE1
  846.      {sun,voder,nsc,mtxinu,dual}!apple!rmh
  847. Apple Computer, Inc.
  848. 20525 Mariani Ave. MS: 3-PK
  849. Cupertino, CA 95014
  850.      --- My opinions, not Apple's.
  851.  
  852.  
  853.  
  854. - -------------------------
  855.  
  856. From: REEKES@applelink.apple.com (Jim Reekes)
  857. Subject:  Can I do these things from a completion proc?
  858. Date: 8 Feb 92 02:34:25 GMT
  859. Organization: Apple Computer, Inc.
  860.  
  861. In article <62394@apple.Apple.COM>, keith@Apple.COM (Keith Rollin) writes:
  862. > In article <kojm6cINNlb4@calvin.usc.edu> davidp@usc.edu writes:
  863. > >
  864. > >After digging through all the docs we have I've decided to try this one
  865. > >on the net...
  866. > >
  867. > >Can I safely do the following from a completion proc registered in an 
  868. > >asynchronous PBControl() call?
  869. > >
  870. > >1.    Call toolbox routines that _do not_ move/purge memory?
  871. > >    Such as BlockMove() -- 411 doesn't say that it moves memory...
  872. > It's safe to call BlockMove(). However, you should carefully consider
  873. > any Toolbox or OS calls your make, regardless of whether or not they
  874. > are on the "may move memory" list. The Mac OS was written with little
  875. > consideration for re-entrancy or for dealing with data stored in
  876. > handles at interrupt time. For instance, DetachResource is not listed
  877. > as moving or purging memory, but I'd never call it at interrupt time.
  878.  
  879. In addition, I have to add an final warning.  This may actually mean that you
  880. cannot call most toolbox traps at interrupt level.
  881.  
  882. Many of the traps rely upon low memory globals.  The Window Manager does this.
  883. The Process Mgr (aka MultiFinder) will swap application specific low memory
  884. globals with each context switch.  The low memory global WindowList is an
  885. example of this.  It changes with each process that's the current process.
  886. >From an interrupt routine you may be "out of context" so that your application's
  887. globals are not in place.  This means that if your interrupt routine called
  888. FrontWindow() it could get the wrong application's window list.  FrontWindow()
  889. does not move/purge memory but you CANNOT call it within an interrupt routine.
  890.  
  891. Additionally, which globals are considered "appliation specific" are not
  892. documented because they've changed with different versions of the system.
  893. This means you cannot determine what low memory globals are valid while within
  894. the interrupt.  Also, we've don't have a list of the globals used by all
  895. of the traps so you don't know what traps are really safe.  The only way
  896. to know that would be to have the source code.
  897.  
  898. Furthermore, you cannot tell exactly when an application is fully in context
  899. from within an interrupt because you may have interrupted the Process Manager
  900. performing the context switch.  Maybe there's a safe way of doing this under
  901. System 7 by finding the current process, but I'm not %100 sure.  Testing
  902. CurApp is not good enough.
  903.  
  904. This little known tid bit has bitten a few applications.  Tell a friend.
  905.  
  906. An interrupt routine shouldn't do much more that set a flag for the event
  907. loop.  There are some documented traps that you can call from an interrupt
  908. routine but I try to avoid doing much of anything other than setting a flag.
  909. Even calling the File System asynchronously is allowed, but it's not a good
  910. idea.  The problem with that one is that the SCSI Manager is NOT asynchronous
  911. and will cause the File System to hang at the interrupt routine waiting for
  912. the SCSI transfer to complete.  This causes the user's machine to be hung
  913. during the time for the transfer and you shouldn't do this at interrupt level.
  914.  
  915. - -----------------------------------------------------------------
  916. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  917.                              |          Sound Manager Expert
  918. Apple Computer, Inc.         | All opinions expressed are mine, and
  919. 20525 Mariani Ave. MS: 81-EQ |  do not necessarily represent those
  920. Cupertino, CA 95014          |  of my employer, Apple Computer Inc.
  921.  
  922.  
  923.  
  924. ---------------------------
  925.  
  926. From: pcalahan@lust.reed.edu (Patrick John Calahan)
  927. Subject: 'snd' resources
  928. Date: 3 Feb 92 21:14:12 GMT
  929. Organization: Reed College, Portland, OR
  930.  
  931. How can I call SndDisposeChannel once a sound has finished playing?
  932.  
  933. I'm still wallowing in my programming impotence.  I still can't get  
  934. SndPlay to do play 'snd's asynchronously.
  935. Whenever I call SndDisposeChannel, the machine crashes (unless I call it
  936. right after the SndPlay, but this is no good since SndDispose waits for
  937. the sound to finish playing).  I tried using callBackCmd to no avail.  I  
  938. imagine i'm missing something stupid/syntactical? I dunno.  If anyone has  
  939. any simple code examples to offer, it would be much appreciated.
  940.  
  941.     Sorry to beat a dying horse,
  942.             -Pat
  943.  
  944.  
  945.  
  946. - -------------------------
  947.  
  948. From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz)
  949. Subject:  'snd' resources
  950. Date: 3 Feb 92 22:48:39 GMT
  951. Organization: University of Illinois at Urbana
  952.  
  953. I tried sending this by email to Patrick Calahan
  954. (pcalahan@lust.reed.edu), but it kept bouncing so here it is for all
  955. to see.
  956.  
  957. - ---
  958.  
  959. OK, here's something that you might try.  It relies on the fact that
  960. you want to play the sound asynchronously, BUT you only want to play
  961. one sound at a time.  If you try to play two sounds simultaneously,
  962. the second sound won't start until the first one finishes.  However,
  963. if you try to play a sound and write stuff all over the screen, they
  964. will happen at about the same time.  I hope this helps.
  965.  
  966. This was written in Think C 5.0.2 for use with TCL, but I am modifying
  967. it just to show you the important stuff.  Let me know if you have any
  968. questions.  This basic idea works for me.  I hope it works for you,
  969. too.
  970.  
  971. - -----------------
  972.  
  973. static    SndChannelPtr    theChannel = NULL; /* declare and initialize the
  974.                         the static var */
  975.  
  976. void    PlaySound(StringPtr aSoundName)
  977. {
  978.     Handle            sndHandle;
  979.     OSErr            theErr;
  980.  
  981.     if (theChannel != NULL)
  982.     {
  983.         SndDisposeChannel(theChannel, FALSE);
  984.         theChannel = NULL;
  985.     }
  986.  
  987.     SndNewChannel(&theChannel, 5, initMono, NULL);
  988.  
  989.     sndHandle = GetNamedResource('snd ', aSoundName);
  990.     HLock(sndHandle); /* I don't think this locking is necessary. */
  991.     LoadResource(sndHandle);
  992.     theErr = ResError(); /* I should probably do something with this
  993.                 error, but I just look at it in the debugger */
  994.     theErr = SndPlay(theChannel, sndHandle, TRUE);
  995.     HUnlock(sndHandle);
  996.     ReleaseResource(sndHandle);
  997. }
  998.  
  999.  
  1000.  
  1001. -- 
  1002. David M. Marcovitz                     |  internet: marcovitz@uiuc.edu
  1003. Computer-based Education Research Lab  |            dmmg1176@uxa.cso.uiuc.edu
  1004. University of Illinois                 |  novanet:  marco / cca / nova
  1005.  
  1006.  
  1007.  
  1008. - -------------------------
  1009.  
  1010. From: REEKES@applelink.apple.com (Jim Reekes)
  1011. Subject:  'snd' resources
  1012. Date: 8 Feb 92 02:15:13 GMT
  1013. Organization: Apple Computer, Inc.
  1014.  
  1015. In article <1992Feb3.224839.29411@ux1.cso.uiuc.edu>, dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) writes:
  1016. > I tried sending this by email to Patrick Calahan
  1017. > (pcalahan@lust.reed.edu), but it kept bouncing so here it is for all
  1018. > to see.
  1019. > -----
  1020. > OK, here's something that you might try.  It relies on the fact that
  1021. > you want to play the sound asynchronously, BUT you only want to play
  1022. > one sound at a time.  If you try to play two sounds simultaneously,
  1023. > the second sound won't start until the first one finishes.  However,
  1024. > if you try to play a sound and write stuff all over the screen, they
  1025. > will happen at about the same time.  I hope this helps.
  1026. > This was written in Think C 5.0.2 for use with TCL, but I am modifying
  1027. > it just to show you the important stuff.  Let me know if you have any
  1028. > questions.  This basic idea works for me.  I hope it works for you,
  1029. > too.
  1030. > -------------------
  1031. > static    SndChannelPtr    theChannel = NULL; /* declare and initialize the
  1032. >                         the static var */
  1033. > void    PlaySound(StringPtr aSoundName)
  1034. > {
  1035. >     Handle            sndHandle;
  1036. >     OSErr            theErr;
  1037. >     if (theChannel != NULL)
  1038. >     {
  1039. >         SndDisposeChannel(theChannel, FALSE);
  1040. >         theChannel = NULL;
  1041. >     }
  1042. >     SndNewChannel(&theChannel, 5, initMono, NULL);
  1043. >     sndHandle = GetNamedResource('snd ', aSoundName);
  1044. >     HLock(sndHandle); /* I don't think this locking is necessary. */
  1045. >     LoadResource(sndHandle);
  1046. >     theErr = ResError(); /* I should probably do something with this
  1047. >                 error, but I just look at it in the debugger */
  1048. >     theErr = SndPlay(theChannel, sndHandle, TRUE);
  1049. >     HUnlock(sndHandle);
  1050. >     ReleaseResource(sndHandle);
  1051. > }
  1052.  
  1053.  
  1054. This will crash under any system older than 6.0.7.  The problem is in
  1055. your call to SndNewChannel.  You should pass 0 as the snth ID.
  1056.  
  1057. This will crash under *ALL* versions of the Sound Manager because you've
  1058. called SndPlay asynchronously but have unlocked and disposed of the
  1059. snd resource.  This is bad because the data has to remain locked and
  1060. resident until the sound has completed.
  1061.  
  1062. You can read about how to properly write Sound Manager code by reading
  1063. through SoundApp.  It's official sample code from Apple, and is available
  1064. on the FTP sites.
  1065.  
  1066.  
  1067. - -----------------------------------------------------------------
  1068. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  1069.                              |          Sound Manager Expert
  1070. Apple Computer, Inc.         | All opinions expressed are mine, and
  1071. 20525 Mariani Ave. MS: 81-EQ |  do not necessarily represent those
  1072. Cupertino, CA 95014          |  of my employer, Apple Computer Inc.
  1073.  
  1074.  
  1075.  
  1076. ---------------------------
  1077.  
  1078. From: bear@csa.bu.edu (Blair M. Burtan)
  1079. Subject: Reading MacApp.$TECH on ETO #5??
  1080. Date: 3 Feb 92 23:11:50 GMT
  1081. Organization: Boston U. College of Engineering
  1082.  
  1083. A question for ETO users out there.  What is the application for reading
  1084. the MacApp.$Tech archives on the ETO CD?
  1085. --
  1086. +---------------------------------------+
  1087. + "If it isn't Baroque, don't fix it."  +
  1088. +               - Beauty and The Beast  +
  1089. +                        +
  1090. + Blair M. Burtan: bear@bucsf.bu.edu    +
  1091. +                  bear@bu-pub.bu.edu   +
  1092. +---------------------------------------+
  1093.  
  1094.  
  1095.  
  1096. - -------------------------
  1097.  
  1098. From: ksand@apple.com (Kent Sandvik)
  1099. Subject:  Reading MacApp.$TECH on ETO #5??
  1100. Date: 5 Feb 92 00:05:25 GMT
  1101. Organization: MacDTS Mongols
  1102.  
  1103. In article <BEAR.92Feb3181150@csa.bu.edu>, bear@csa.bu.edu (Blair M. Burtan) writes:
  1104. > A question for ETO users out there.  What is the application for reading
  1105. > the MacApp.$Tech archives on the ETO CD?
  1106.  
  1107. Those files are AppleLink files, i.e. TEXT format. Any editor
  1108. or word processor should work.
  1109.  
  1110. Kent Sandvik
  1111.  
  1112.  
  1113.  
  1114. - -------------------------
  1115.  
  1116. From: krf@vulcan.ral.rpi.edu (Keith R. Fieldhouse)
  1117. Subject:  Reading MacApp.$TECH on ETO #5??
  1118. Date: 5 Feb 92 14:19:15 GMT
  1119. Organization: Rensselaer Polytechnic Institute, Troy NY
  1120.  
  1121.  
  1122.  
  1123. I've been able to read the individual files with AppleLink.  What I'd like,
  1124. though is a browser that allows me to look at the subjects and choose the 
  1125. files that I want to read (a browser other than the Finder that is :-))
  1126. Can AppleLink be configured to do that?
  1127.  
  1128.                 - Keith
  1129.  
  1130. -- 
  1131. Keith R. Fieldhouse            krf@ral.rpi.edu        "READY?"
  1132.  
  1133.  
  1134.  
  1135. - -------------------------
  1136.  
  1137. From: ksand@apple.com (Kent Sandvik)
  1138. Subject:  Reading MacApp.$TECH on ETO #5??
  1139. Date: 7 Feb 92 20:18:08 GMT
  1140. Organization: MacDTS Mongols
  1141.  
  1142. In article <_w=sxzh@rpi.edu>, krf@vulcan.ral.rpi.edu (Keith R. Fieldhouse) writes:
  1143. > I've been able to read the individual files with AppleLink.  What I'd like,
  1144. > though is a browser that allows me to look at the subjects and choose the 
  1145. > files that I want to read (a browser other than the Finder that is :-))
  1146. > Can AppleLink be configured to do that?
  1147.  
  1148. Nope, someone tried to write a similar thread-based text browser tuned for
  1149. MacApp entries some ago (was it called Threesaver?), anyway I have not 
  1150. heard anything about the project for a long time.
  1151.  
  1152. Anyway, there might be a need for a PD text browser which could browse 
  1153. general text based on particular pattern recognition criterias, it
  1154. could be useful for comp.sys.mac.programmer archives as well. I've used
  1155. elm for opening mbox type UNIX News archives, and it shouldn't be that
  1156. hard to write a hardcoded Mac browser, but to make it more smart requires
  1157. more design, and maybe agent-AI type capabilities.
  1158.  
  1159. Kent Sandvik
  1160.  
  1161.  
  1162.  
  1163. - -------------------------
  1164.  
  1165. From: ksand@apple.com (Kent Sandvik)
  1166. Subject:  Reading MacApp.$TECH on ETO #5??
  1167. Date: 7 Feb 92 20:19:20 GMT
  1168. Organization: MacDTS Mongols
  1169.  
  1170. In article <_w=sxzh@rpi.edu>, krf@vulcan.ral.rpi.edu (Keith R. Fieldhouse) writes:
  1171. > I've been able to read the individual files with AppleLink.  What I'd like,
  1172. > though is a browser that allows me to look at the subjects and choose the 
  1173. > files that I want to read (a browser other than the Finder that is :-))
  1174. > Can AppleLink be configured to do that?
  1175.  
  1176. Another suggestion, we are using On Location for indexing source and
  1177. information servers/hard disks, so if you index the CD with On Location
  1178. you should have a pretty good way to access MacAppTech archives.
  1179.  
  1180. Kent Sandvik
  1181.  
  1182.  
  1183.  
  1184. ---------------------------
  1185.  
  1186. From: janee@ima.isc.com (Jane Eisenstein)
  1187. Subject: where Hunk Manager?
  1188. Date: 5 Feb 92 23:33:21 GMT
  1189. Organization: Interactive Systems, Cambridge, MA 02138-5302
  1190.  
  1191. I'm interested in getting product info on the Hunk Manager.  Can someone
  1192. supply me with a phone number or company name and address?
  1193.  
  1194. Is anyone happily using this product?
  1195.  
  1196.     Jane Eisenstein
  1197.     janee@ima.isc.com
  1198.  
  1199.  
  1200.  
  1201. - -------------------------
  1202.  
  1203. From: deadman@garnet.berkeley.edu (Ben Haller)
  1204. Subject:  where Hunk Manager?
  1205. Date: 8 Feb 1992 00:18:24 GMT
  1206. Organization: Stick Software
  1207.  
  1208. In article <1992Feb05.233321.10787@ima.isc.com> janee@ima.isc.com
  1209.    (Jane Eisenstein) writes:
  1210. >I'm interested in getting product info on the Hunk Manager.  Can someone
  1211. >supply me with a phone number or company name and address?
  1212. >
  1213. >Is anyone happily using this product?
  1214. >
  1215. >    Jane Eisenstein
  1216. >    janee@ima.isc.com
  1217.  
  1218.   I thought they had changed this to the SO Manager, in order to not be
  1219. sexist?  I think it's prerelease, their beta testers are having a lot of
  1220. trouble with compatability problems.  Once they get it out the door,
  1221. though, it should make Macs a lot more popular, no?
  1222.   As to whether anyone is happily using the product, well, I can't say
  1223. I've had much success, but I know people who have had other experiences...
  1224. I think it basically depends on what kind of platform you're running the
  1225. manager on.
  1226.   As with everything else in the OS, people are already complaining that
  1227. you need to go around the manager to obtain sufficient speed...and your
  1228. development system had better have the right glue...I'm running low on
  1229. jokes for now, anyone else wanna join the fun?
  1230.   (The original post *was* a joke, wasn't it?)
  1231.  
  1232. -Ben Haller (deadman@garnet.berkeley.edu)
  1233.  
  1234.  
  1235.  
  1236. - -------------------------
  1237.  
  1238. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  1239. Subject:  where Hunk Manager?
  1240. Organization: Kalamazoo College
  1241. Date: Sat, 8 Feb 1992 19:43:28 GMT
  1242.  
  1243. deadman@garnet.berkeley.edu (Ben Haller) writes:
  1244. >janee@ima.isc.com (Jane Eisenstein) writes:
  1245. >>I'm interested in getting product info on the Hunk Manager.  Can someone
  1246. >>supply me with a phone number...?
  1247. >>
  1248. >  As to whether anyone is happily using the product, well, I can't say
  1249. >I've had much success, but I know people who have had other experiences...
  1250. >I think it basically depends on what kind of platform you're running the
  1251. >manager on.
  1252. >  As with everything else in the OS, people are already complaining that
  1253. >you need to go around the manager to obtain sufficient speed...and your
  1254. >development system had better have the right glue...
  1255.  
  1256. I heard it's not 32-bit clean.  This means, of course, that if you don't
  1257. strip off the important bits, you could end up entering the routine in
  1258. completely the wrong place.
  1259.  
  1260. Plus, it's very object-oriented.  I may be old-fashioned, but I prefer
  1261. the good old days, when no one walked around saying "OOPS" all the time.
  1262. Now all anyone wants to do is lock up your main segment.
  1263.  
  1264. There's going to be a new group of apple events to deal with it.  Last I
  1265. heard, they were going to call it the "sticky suite."
  1266. -- 
  1267.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  1268.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  1269.  
  1270.  
  1271.  
  1272. - -------------------------
  1273.  
  1274. From: rsfinn@concerto.lcs.mit.edu (Russell S. Finn)
  1275. Subject:  where Hunk Manager?
  1276. Date: 9 Feb 92 20:45:47 GMT
  1277. Organization: /u/rsfinn/.organization
  1278.  
  1279. Ben Haller and Jamie McCarthy obviously thought this was a joke, which
  1280. I guess is understandable, but they didn't put any smileys in their
  1281. posts either, which might confuse some people too.
  1282.  
  1283. In fact, it's *not* a joke.  For the original poster, Jane Eisenstein,
  1284. and anyone else who's interested, here's some information I found
  1285. elsewhere.  Note that I have *not* used this product, so I can't
  1286. discuss its merits (but it sure *sounds* like a good idea).
  1287.  
  1288. "The Hunk Manager is a database tool designed for use with Apple
  1289. Macintosh computers. It is a replacement for the Resource Manager,
  1290. the simple and incredibly useful database built into the Macintosh
  1291. Toolbox.  It provides a library of routines which are the analogues of
  1292. those used in the Resource Manager, but without the limitations
  1293. imposed by the Resource Manager architecture."
  1294.  
  1295. ...
  1296.  
  1297. "The Macintosh programming environment is based on handles
  1298. (relocatable blocks of program defined memory), and The Hunk Manager
  1299. was designed explicitly to work with variable length, handle-based
  1300. structures.  Almost any kind of Macintosh data can be stored and
  1301. manipulated almost transparently using The Hunk Manager.
  1302.  
  1303. "If you've used the Resource Manager you already know how to use the
  1304. Hunk Manager.  The Hunk Manager routines provide almost 'plug-and-
  1305. play' compatibility with Resource Manager calls.  The Hunk Manager is
  1306. available as a linkable object file library for MPW C/Pascal and Think
  1307. C/Pascal."
  1308.  
  1309. Here's the contact information:
  1310.  
  1311. Gettys Group Software Inc.
  1312. 401 East Illinois Street, Suite 600
  1313. Chicago, IL  60611
  1314. Fax 312.836.4220
  1315. 312.836.4222
  1316. AppleLink: GG.SOFT
  1317.  
  1318. I am not affiliated with this company, just passing the info along.
  1319.  
  1320. -- Russell S. Finn
  1321. rsfinn@lcs.mit.edu
  1322.  
  1323.  
  1324.  
  1325. ---------------------------
  1326.  
  1327. End of C.S.M.P. Digest
  1328. **********************
  1329.